package bidserver.src;

public class LamportClock {
	int c;
	public LamportClock() {
		c = 1;
	}
	public int getValue() {
		return c;
	}
	public int tick() { //on internal events
		return ++c;
	}
	public void sendAction() { //include c in message
		c++;
	}
	public void receiveAction(int sentValue){
		c = Util.max(c, sentValue) + 1;
	}
}
